package cn.lhq.controller.user;

import java.sql.Timestamp;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.lhq.bean.VoteResult;
import cn.lhq.service.UserServiceImpl;
@Controller
@RequestMapping("/user")
public class LoginController {
	
	@Resource
	UserServiceImpl userServiceImpl;
	@RequestMapping("/login.do")
	@ResponseBody
	public VoteResult login(String username,String password,Long timestamp){
		VoteResult result = null;
		try {
			result = userServiceImpl.checkLogin(username, password,timestamp);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return result;
	}
	
}
